package cn.wolfcode.shop.mapper;

import cn.wolfcode.shop.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("select * from t_user where id = #{id}")
    User selectByPrimaryKey(Long id);

    //参数多的时候，可以用VO来封装参数
    @Select("select * from t_user where id = #{id} and password = #{password}")
    User findByIdAndPsw(@Param("id") String mobile, @Param("password") String password);
}